def is_duplication_list(list_nums):
    """
        判断列表是否有重复元素
    :param list_nums:
    :return:
    """
    for r in range(len(list_nums) - 1):
        cur_num = list_nums[r]
        for c in range(r + 1, len(list_nums), 1):
            next_num = list_nums[c]
            if cur_num == next_num:
                return True
    return False


is_duplication_num = is_duplication_list([1, 2, 3, 4, 5])
if is_duplication_num:
    print('有重复元素')
else:
    print('没有重复元素')
